package com.bci.pwtz.service;

import com.bci.pwtz.common.util.PaginationList;
import com.bci.pwtz.exception.CanNotDeleteException;
import com.bci.pwtz.exception.PwtzDatabaseException;
import com.bci.pwtz.mysql.model.Resource;


public interface ResourceService {
/**
 * 添加资料	
 * @param res
 * @return 
 * @throws PwtzDatabaseException
 */
	int add(Resource res) throws PwtzDatabaseException;
	/**
	 * 删除资料
	 * @param resid
	 * @return
	 * @throws PwtzDatabaseException
	 * @throws CanNotDeleteException
	 */
	
	int delete(Long resid) throws PwtzDatabaseException;
	
	/**
	 * 修改资料
	 * @param resource
	 * @return
	 * @throws PwtzDatabaseException
	 */
	 int update(Resource resource) throws PwtzDatabaseException;
	 /**
	  * 通过id查询对象
	  * @param resid
	  * @return
	  * @throws PwtzDatabaseException
	  */
	 Resource load(Long resid) throws PwtzDatabaseException;
	 
	 /**
	  * 查询资料集合
	  * @param pageSize
	  * @param pageNo
	  * @return
	  * @throws PwtzDatabaseException
	  */
	 PaginationList<Resource> findResource(int pageSize, int pageNo,int restype,String resname) throws PwtzDatabaseException;
	
	 
	 
}
